home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ML_VECTB.ZIP / UTILS / MKFORM6.PAS < prev    next >
Pascal/Delphi Source File  |  1996-03-10  |  1KB  |  70 lines

  1. uses dosio;
  2. var
  3.   coord:array[0..60] of record x,y,z:integer end;
  4.   max:word;
  5.   f:file;
  6.  
  7. Procedure BuildForm;
  8. var a:integer;
  9. begin
  10.   max:=0;
  11.   for a:=0 to 4 do begin
  12.     with coord[max] do begin
  13.       x:=a*20-20; y:=0; z:=0;
  14.     end;
  15.     inc(max);
  16.   end;
  17.   for a:=1 to 4 do begin
  18.     with coord[max] do begin
  19.       x:=4*20-20; y:=0; z:=a*20;
  20.     end;
  21.     inc(max);
  22.   end;
  23.   for a:=3 downto 0 do begin
  24.     with coord[max] do begin
  25.       x:=a*20-20; y:=0; z:=4*20;
  26.     end;
  27.     inc(max);
  28.   end;
  29.   for a:=3 downto 1 do begin
  30.     with coord[max] do begin
  31.       x:=-20; y:=0; z:=a*20;
  32.     end;
  33.     inc(max);
  34.   end;
  35.   for a:=1 to 8 do begin
  36.     with coord[max] do begin
  37.       x:=trunc(a*4.444)-20;
  38.       y:=a*15;
  39.       z:=trunc(a*4.444);
  40.     end;
  41.     inc(max);
  42.     with coord[max] do begin
  43.       x:=trunc(80-a*4.444)-20;
  44.       y:=a*15;
  45.       z:=trunc(a*4.444);
  46.     end;
  47.     inc(max);
  48.     with coord[max] do begin
  49.       x:=trunc(a*4.444)-20;
  50.       y:=a*15;
  51.       z:=trunc(80-a*4.444);
  52.     end;
  53.     inc(max);
  54.     with coord[max] do begin
  55.       x:=trunc(80-a*4.444)-20;
  56.       y:=a*15;
  57.       z:=trunc(80-a*4.444);
  58.     end;
  59.     inc(max);
  60.   end;
  61. end;
  62.  
  63. begin
  64.   Writeln('Making figure ...');
  65.   openforoutput(f,'_pyram.bal','');
  66.   BuildForm;
  67.   blockwrite(f,max,2);  { Nr of points in the 3D form }
  68.   blockwrite(f,coord,max*3*2);
  69.   closefile(f,'');
  70. end.